﻿#region Usings

using FluentValidation;
using Yandex.Market.Api.Model;

#endregion

namespace Yandex.Market.Api.Validation
{
    internal class OrderingTimeValidator : AbstractValidator<OrderingTime>
    {
        public OrderingTimeValidator()
        {
            RuleFor(orderingTime => orderingTime.Ordering).SetValidator(new OrderingValidator())
                .When(orderingTime => orderingTime.Ordering != null)
                .WithMessage("Неверный объект {PropertyName}");                                                                                                                                                               
        }
    }
}